<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>网上银行综合管理系统</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/auth.css') }}">
</head>
<body>
    <div class="login-container">
        <h1>银行系统</h1>

         <!-- 错误消息显示区域 - 确保这里正确放置 -->
        <div class="error-messages">
            {% with messages = get_flashed_messages(with_categories=true) %}
                {% if messages %}
                    {% for category, message in messages %}
                        <div class="alert alert-{{ category }}">
                            <i class="fas
                                {% if category == 'error' %}
                                    fa-exclamation-circle
                                {% elif category == 'success' %}
                                    fa-check-circle
                                {% else %}
                                    fa-info-circle
                                {% endif %}
                            "></i> {{ message }}
                        </div>
                    {% endfor %}
                {% endif %}
            {% endwith %}
        </div>

        <form id="loginForm" action="{{ url_for('auth.login') }}" method="POST">
            <div class="form-group">
                <label for="cardID">银行卡号/管理员</label>
                <input type="text" id="cardID" name="cardID" required>
            </div>

            <div class="form-group">
                <label for="passwd">密码</label>
                <input type="password" id="passwd" name="passwd" required>
            </div>

            <button type="submit" class="login-btn">登录</button>
        </form>

        <div class="login-info">
            <p>管理员登录: 卡号 123456, 密码 888888</p>
        </div>
    </div>

    <script src="{{ url_for('static', filename='js/auth.js') }}"></script>

    <!-- 添加Font Awesome图标库 -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/js/all.min.js"></script>
</body>
</html>